Attack Damage
This is how the game calculates combat damage. General Formulas In order to determine the damage a unit will inflict upon attacking (including counterattack and ranged attack) the game calculates: Damage = Modified Attack - Total Defense Total Defense is simply the unit's defense (or ranged defense or resistance) including any skills or effects. See below what happens when this value is 0 or negative. Modified Attack has a more complicated formula; *Here "Attack" is the unit's attack value including any skills or effects. *Random x,y is a number between x and xy. If Attack >= 5: Mod Attack = Random [ 0.8 * Attack , 1.2 * Attack ] Example: If a unit's attack is 10; the the minimum attack will be 0.8*10 = 8 and the max attack will be 1.2*10 = 12. If Attack < 5: Mod Attack = Random [ Attack - 1 , Attack + 1 ] *Modified attack has a minimum value of 1 (can't be 0 or negative). *All results are rounded down to integers. Negative Damage If the Damage value calculated by the equation at the top of this page is 0 or negative there is still a probability that the unit will inflict 1 damage. If the value is -10 or lower there is no chance of inflicting any damage. The probablities are summarized in the following tabel. General Note *Attack, Counterattack, Ranged attack, Defense, Ranged Defense and Resistance are calculated just when they action are preformed. Example: a unit that was attacked and lost more than 50% of it's hit points will have a penalty to it's counterattack, this penalty will take effect in the current counterattack. *Stamina is decreased after the action is carried out (bugged in some cases). Melee Attacks Notes *If a defending unit has the skill First Strike and the attacker does not, the defender will attack first (using the counterattack attribute). *The Crushing Blow skill increases the attack value of the unit by half (attack/2) of its current attack. *If a unit has the Smite Evil (X) skill increases the attack value of an attacker by: X*Karma of the defender unit (Unscrupulous = -1, Evil = -2, Evil Incarnate = -3). Example: a unit with Smite Evil (2) attacking an Evil unit will have and increased attack of 2*2=4. *If an attacker has the Magic Strike skill, the defender will use it's resistance attribute to calculate the total defense value. *Armorpiercing Strike reduces the total defense value of the defender by half (rounded down). This skill is used in attacks and counterattacks. *Precise Strike (X) reduces a defender's total defense by X (but not below 0). This skill is used only when attacking not when counterattacking. *Parry (X) increases the unit's defense by X for the first attack it receives each turn. This skill doesn't work when the unit with Parry is the attacker (and receives a counterattack). If stamina is 0 this skill doesn't work. *If the attacker has both Armorpiercing Strike and Precise Strike, and the defender has Parry, the skills will trigger is the following sequence: Armorpiercing Strike -> Parry -> Precise Strike. *Charge damage is added after all the calculations, it is not in the formulas above. The formula is N-2, where N is the number of steps between starting position of attacker and defender. *The Trample skill doesn't work on counterattacks. Ranged Attacks Notes *If the attacker has the Magic Shot skill the defender will use it's resistance instead of it's ranged defense. The attacker's Armorpiercing Shot, Precise Shot and Fire Arrows skills do not work either. *Armorpiercing Shot and Precise Shot work like Armorpiercing Strike and Precise Strike above. *Fire Arrows (X), add damage after all the above calculations by the formula: X - resistance (minimum value is 0). *If a unit uses Double Shot, damage and effects are calculated separately for each shot. Stamina fo the attacker decreases after the second shot (still bugged). Category:Combat Mechanics